package com.randi.monitor.controller;

import com.randi.common.core.domain.Result;
import com.randi.monitor.dto.SysServer;
import com.randi.monitor.service.ISysServerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author ziye
 */
@RestController
@RequestMapping("monitor/server")
@Api(tags = "服务监控")
public class SysServerController {

    @Resource
    private ISysServerService iSysServerService;

    /**
     * 获取信息
     *
     * @return Result
     */
    @GetMapping("/info")
    @ApiOperation(value = "获取信息", notes = "")
    public Result getInfo() {
        return Result.success().put(iSysServerService.getInfo());
    }

}
